{*include file="template/admin_head.htm"*}
<link rel="stylesheet" href="/public/js/chosen/chosen.css">
<link rel="stylesheet" href="/public/js/tageditor/jquery.tag-editor.css">
<script src="/public/js/tageditor/jquery.tag-editor.js"></script>
<script src="/public/js/jquery/jquery.colorpicker.js" type="text/javascript"></script>
<script src="/public/js/chosen/chosen.jquery.js" type="text/javascript"></script>
<script src="/public/js/jquery/jquery.cookie.js"></script>
  
<table id="containtable" cellspacing="0" cellpadding="0" class="{*$cf_controller*}">
    <tr>
        <td width="1979" valign="top" bgcolor="#FFFFFF">
            <div class="wrapper pr_8">
			{*if $cf_action=='add' || $cf_action=='edit'*}  
            
			<script type="text/javascript">
			 $(function(){			
				call_uploader('#goods_image_button','#goods_image','goods',{'show':'#goods_image_show'});				
				$("#act_form").submit(function(){					
					if($("#cr_title").val() == ''){
						my_alert('请输入标题','错误提示',"$('#cr_title').focus()");
						return false;										
					}	
					if($("#cr_url").val() == ''){
						my_alert('请输入链接地址','错误提示',"$('#cr_title').focus()");
						return false;										
					}					
					if($("#cr_image").val() == ''){
						my_alert('请上传封面图片','错误提示',"$('#cr_image').focus()");
						return false;										
					}						
				});
								
				call_uploader('#cr_image_button','#cr_image','nofix',{'show':'#cr_image_show'});
				{*if $row['cr_image']*}
				$("#cr_image_show").append(show_photo_div("#cr_image_button","#cr_image","{*$row['cr_image']*}","admin",false));
				{*/if*}
								
		    });
			</script>
			
			<div class="content_panel_title">
				<div class="contentpanelleft"></div>
				<div class="contentpanelcenter">
					<span class="contentpanelcenter_font">新增/修改微课堂</span>
					<span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">微课堂管理</a></span>
				</div>
				<div class="contentpanelrihgt"></div>
            </div>
			<div class="bq clearfix">
			<b><a href="javascript:void(0)" class="tapbt">基本信息</a></b>
			
			</div>

			
			<div class="content_table_center_style">
                    <div class="p8">

                        <form name="act_form" id="act_form" method="post" action="{*$cf_self_page*}">
                            <input name="id" id="id" type="hidden" value="{*$row['cr_id']*}" />
                            <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                            <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
				

				<div class="tab-page" style="display: block;">	
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbl tbl_nbr">
				<tbody>
					<tr>
					<td colspan="4" class="stitle">商品信息</td>
				  </tr>
          <tr>
            <td width="15%" align="right">微课堂标题:</td>
            <td colspan="3" align="left"><input type="text" size="50" id="cr_title" name="cr_title" value="{*$row['cr_title']*}"  /></td>
            </tr>
           <tr>
             <td width="15%" align="right">链接地址:</td>
             <td colspan="3" align="left"><input type="text" size="50" id="cr_url" name="cr_url" value="{*$row['cr_url']*}"  /></td>
           </tr>                     
				    <tr>
				      <td align="right">微课堂封面图:</td>
				      <td colspan="3" ><span id='cr_image_show'><img style="cursor:pointer" id="cr_image_button" src="/public/images/admin/upload.jpg" /></span>
				        <input type="hidden" name="cr_image" id="cr_image" value="{*$row['cr_image']*}" /></td>
				      
				      </tr> 
                                      
                  <tr>
                        <td align="right">是否显示:</td>
                        <td width="26%" align="left">{*html_radios name=cr_show options=$cf_info_var_common['yesno'] checked=$row['cr_show']|default:'1'*}</td>
                        <td width="11%" align="right">&nbsp;</td>
						<td width="48%">&nbsp;</td>
					</tr>
                  </tbody>
			    </table>
				</div>
				
			
				
				
				<script type="text/javascript">
				var config = {
				  '.chosen-select'           : {},
				  '.chosen-select-deselect'  : {allow_single_deselect:true},
				  '.chosen-select-no-single' : {disable_search_threshold:10},
				  '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
				  '.chosen-select-width'     : {width:"95%"}
				}
				for (var selector in config) {
				  $(selector).chosen(config[selector]);
				}
			  </script>
				<div class="pt_8" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                 &nbsp;&nbsp;<input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></div>
                     </form>
                    </div>
                </div>
				
                <div class="tab-page" style="display:block" >
                    <div style="display:none"> 
                        <ul id="copy_info">
                            <li>
                                <span class="span1" style="width:200px"><input name="item_title[]" type="text" size="30"  /></span>
                                <span class="span1"><input name="item_price[]" type="text" size="6" /></span>
                                <span class="span1"><input name="item_original_price[]" type="text" size="6" /></span>
                                <span class="span1"><input name="item_board_price[]" type="text" value="{*$item['board_price']*}" size="6" /></span>
                                <span><a href="javascript:void(0)" class="del_item"><img src="public/images/admin/close.png" /></a></span>
                            </li>
                        </ul>
                        
                        <ul id="surcharge_info">
                            <li>
                                <span class="span1" style="width:200px"><input name="surcharge_title[]" type="text" size="30"  /></span>
                                <span class="span1"><input name="surcharge_price[]" type="text" size="8" /></span>
                                <span class="span1" style="width:200px"><input name="surcharge_free_number[]" type="text" size="8" /></span>
                                <span><a href="javascript:void(0)" class="del_surcharge"><img src="public/images/admin/close.png" /></a></span>
                            </li>
                        </ul>
                    </div>
                </div>                
                
				<div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>		
			
			{*else*}
			<script type="text/javascript">
			
			$(function(){
				load_province('cate',"{*$cate1*}","{*$cate2*}");
				$("#cate1").change(function(){                                   //更改分类
					change_province('cate',$(this).val());
				});
				
				$("#checkall").toggle(
                    function(){
                        select_all("idlist[]",true);
                    },
                    function(){
                        select_all("idlist[]",false);
                    }
                );
				
				$("#list_form").submit(function(){
					if(!count_select("idlist[]")){
						my_alert('请选择记录','操作提示');
						return false;
					};
					if($("#alltype").val()==''){
						my_alert('请选择操作方式','Error',"$('#alltype').focus()");
						return false;
					};
					if(confirm('确定进行操作?')==false){
						return false;
					}
					return true;
                });				
			})
			</script>
			
			<div class="pannel">
        <div class="pl"></div>
        <div class="pr"></div>
        <div class="pc1">
            <form action="" method="get" id="search_form" name="search_form">
                <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                <input name="self" id="self" type="hidden" value="{*$self*}" />
                <div class="pt">
                  标题:<input type="text" size="20" id="skey" name="skey" class="tet" value="{*$skey*}" />
                  &nbsp;&nbsp;
              创建时间:
                    <input name="skey2" class="Wdate" type="text" id="act_start" value="{*$skey2*}" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'act_end\')}',dateFmt:'yyyy-MM-dd',isShowClear:true,readOnly:true});" size="15" maxlength="30" />
                    到<input name="skey3" class="Wdate" type="text" id="act_end" value="{*$skey3*}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'act_start\')}',dateFmt:'yyyy-MM-dd',isShowClear:true,readOnly:true});" size="15" maxlength="30" />                     		     
                    <input type="image" src="public/images/admin/icon_search_btn.gif" />
                </div>
            </form>
        </div>
    </div>
			
			<div class="content_panel_title">
				<div class="contentpanelleft"></div>
				<div class="contentpanelcenter">
					<span class="contentpanelcenter_font">微课堂管理</span>
					<span><a class="edit at" href="{*$cf_self_path*}-act_add.htm?dpt={*$cf_dpt*}">添加微课堂</a></span>&nbsp;
				</div>
				<div class="contentpanelrihgt"></div>
		    </div>
			
			<div class="content_table_center_style">
			<div class="p8">
			    <div class="bq clearfix">
				<b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}" class="{*if $self==''*}active{*/if*}">所 有</a></b></div>
			    <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
				<input name="act" type="hidden" value="all" />
				<input name="dpt" type="hidden" value="{*$cf_dpt*}" />
				<table width="100%" class="tbl tbl_nbr">
				    <thead>
					<tr class="thd">
					  <td width="9%" align="center" class="thr">ID</td>
					    <td width="14%" align="center" class="thr">微课堂标题</td>
					    <td width="11%" align="center" class="thr">封面图</td>
					    <td width="33%" align="center" class="thr">连接地址</td>
					    <td width="13%" align="center" class="thr">是否显示</td>
					    <td width="11%" align="center" class="thr">创建时间</td>
					    <td colspan="2" align="center" class="thr">操作</td>
					</tr>
				    </thead>
				    <tbody>
					{*foreach $data_ary as $item*}
					<tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
					  <td align="center">{*$item['cr_id']*}</td>
					    <td align="left"><a href="{*$item['cr_url']*}" title="查看詳情" class="edit" target="_blank">{*$item['cr_title']*}</a></td>
					    <td align="center"><a href="{*$item['cr_image']*}" target="_blank" ><img src="{*$item['cr_image']*}" height="50px" /></a></td>
					    <td align="left"><a href="{*$item['cr_url']*}" target="_blank">{*$item['cr_url']*}</a></td>
					    <td align="center">{*$cf_info_var_common['yesno'][$item['cr_show']]*}</td>
					    <td align="center">{*$item['cr_create_time']*}</td>
					    <td width="5%" align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item['cr_id']*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
					    <td width="4%" align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item['cr_id']*}.htm" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
					    
                      </tr>
					{*/foreach*}
					<tr class="tft">
					    <td colspan="8" style="padding:0;">
						<table width="100%" border="0">
						    <tr>
                                                    <td width="6%" align="center" style="border:0;padding:0;">&nbsp;</td>
                                                    <td width="22%" align="center" style="border:0;padding:0;">&nbsp;</td>
                                                    <td width="72%" style="border:0;padding:0;" ><div class="turnPage"><p>{*$page*}</p></div></td>
                                                </tr>
						</table>                                </td>
					</tr>
				    </tbody>
				</table>
			    </form>
			</div>
		    </div>
			
			<div class="content_main_bottom">
				<div class="content_main_bottom_left"></div>
				<div class="content_main_bottom_right"></div>
		    </div>			

		    {*/if*}
			</div>
		</td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}